import ajax from "./ajax";

//信誉分记录
export const credit_score = (data) => {
  return ajax({
    url: '/api/v1/credit_score?limit=' + data.limit + '&page=' + data.page,
    method: 'GET',
    data: data
  })
}

//我的下级提成统计
export const statistics = (data) => {
  return ajax({
    url: '/api/v1/teams/statistics',
    method: 'GET',
    data: data
  })
}

//我的下级列表
export const subordinates = (data) => {
  return ajax({
    url: '/api/v1/teams/subordinates?page=' + data.page + '&limit=' + data.limit + '&level=' + data.level + '&column=' + data.column + '&sort=' + data.sort + '&phone=' + data.phone,
    method: 'GET',
    data: data
  })
}

//手续费兑换
export const exchange = (data) => {
  return ajax({
    url: '/api/v1/teams/exchange',
    method: 'POST',
    data: data
  })
}

//手续费记录
export const handlingFeeList = (data) => {
  return ajax({
    url: '/api/v1/teams/handlingFee/list?limit='+data.limit+'&page='+data.page,
    method: 'GET',
    data: data
  })
}


//活动列表
export const activities = (data) => {
  return ajax({
    url: '/api/v1/activities?page=1&limit=100',
    method: 'GET',
    data: data
  })
}
//获取邀请页面信息
export const invites = (data) => {
  return ajax({
    url: '/api/v1/invites',
    method: 'GET',
    data: data
  })
}


//算力兑换
export const user_exchange = (data) => {
  return ajax({
    url: '/api/v1/user/exchange',
    method: 'POST',
    data: data
  })
}

//算力转账
export const transferMoney = (data) => {
  return ajax({
    url: '/api/v1/transferMoney',
    method: 'POST',
    data: data
  })
}

//代付订单详情
export const paymentsDetail = (data) => {
  return ajax({
    url: '/api/v1/payments/detail?payment_detail_id='+ data.payment_detail_id,
    method: 'GET',
    data: data
  })
}

//代付订单确认付款
export const payments = (data) => {
  return ajax({
    url: '/api/v1/payments',
    method: 'POST',
    data: data
  })
}



//代付订单确认付款
export const incomeOrder = (data) => {
  return ajax({
    url: '/api/v1/incomeOrder?order_no='+data.order_no,
    method: 'GET',
    data: data
  })
}

//代收订单确认收款
export const incomeOrderConfirm = (data) => {
  return ajax({
    url: '/api/v1/incomeOrder/confirm',
    method: 'POST',
    data: data
  })
}


//团队文章列表
export const articlesTeamsDescription = (data) => {
  return ajax({
    url: '/api/v1/articles?key=TeamsDescription&page=1&limit=10',
    method: 'GET',
    data: data
  })
}